package demo;

class Shape {
    public void draw() {
        System.out.println("画图！");
    }
}
class Rect extends Shape {
    public void draw() {
        System.out.println("⬜");
    }
}
class Triangle extends Shape {
    public void draw() {
        System.out.println("🔺");
    }
}
class Cycle extends Shape {
    public void draw() {
        System.out.println("⚪");
    }
}

public class Test {
    public static void drawMap(Shape shape){
        shape.draw();
    }
    public static void main(String[] args) {
        Shape[] shapes={new Cycle(),new Rect(),new Triangle()};
        for(Shape shape:shapes) {
            shape.draw();
        }
    }
}
